<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-bind</title>
		<style>
			.active{
				border-color: 10px solid #00ffff;
			}
		</style>
	</head>
	<body>
		
		<div id='app'>
			<img v-bind:src="imgSrc" alt="">
			<br>
			<img :src="imgSrc" alt="" :title="imgTitle+'!!!'"
			:class="isActive?'active':''" @click="toggleActive">
			<br>
			<img :src="imgSrc" alt="" :title="imgTitle+'!!!'"
			:class="{active:isActive}" @click="toggleActive">
		</div>
		
		 <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<script>	 
		var vm = new Vue({
				 el: "#app",
				 data: {
					imgSrc:"http://www.itheima.com/images/logo.png",
					imgTitle:"黑马",
					isActive:false
				 },
				 methods: {
					 toggleActive:function(){
						 this.isActive = !this.isActive;
					 }
				 },
			 })
	    
		
		 </script>
	</body>
</html>